package Demo7;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class FileReaderTest1 {
    public static void main(String[] args) {
        Reader reader = null;
        try {
            reader = new FileReader("f:/Test/a.txt");
            char[] ch = new char[1024];
            int len;
            while ((len = reader.read(ch))!=-1){
                System.out.println(ch);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                reader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
